home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_18743.txt < prev    next >
Text File  |  1991-02-27  |  754b  |  22 lines

  1. -- card: 18743 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10.     inherited::set();
  11.  
  12. The 'inherited' specifier indicates that the set() method of the base class (namely Person) is being called.  When a set message is sent to an object of type Student, the   id_number instance variable is assigned, and then the age and weight instance variables are assigned according to the inherited set() function.
  13.  
  14. In C++ the 'inherited' word is not available, and the programmer should instead use:
  15.  
  16.     Person::set();
  17.  
  18. The overriding print() method uses the same technique to call the inherited print() method.
  19.  
  20. -- part contents for background part 7
  21. ----- text -----
  22. 46